package ioc;

import lombok.Data;

import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
import java.util.List;

@Data
public class GeneralBeanDefinition implements IBeanDefinition
{
    private String scope = SCOPE_SINGLETION;

    private Class beanClass;

    private String factoryMethodName;

    private String factoryBeanName;

    private String initMethodName;

    private String destroyMethodName;

    private List<Object> constructorArgumentValues;

    private List<Object> propertyValues;

    private Constructor constructor;

    private Method factoryMethod;

    public Boolean isSingleton()
    {
        return this.scope.equals(SCOPE_SINGLETION);
    }

    public Boolean isPrototype() {
       return this.scope.equals(SCOPE_PROTOTYPE);
    }
}
